<template>
  <div class='playVideo'>

    <div class="box">
      <video autoplay controls="controls" :src="src"></video>
    </div>
    <div class="close" @click="$emit('close')"><i class="el-icon-close"></i></div>
  </div>
</template>

<script>

export default {
  props: {
    src: {
      type: String,
      required: true
    }
  },
  name: 'playVideo',
  components: {},
  data () {
    return {

    }
  },
  methods: {

  }
}
</script>

<style lang='scss' scoped>
.playVideo {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  overflow: hidden;
  z-index: 9999;
  .box {
    width: 800px;
    height: 600px;
    position: absolute;
    left: 50%;
    top: 50%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    video {
      width: 100%;
      height: 100%;
    }
  }
  .close {
    width: 50px;
    height: 50px;
    position: absolute;
    top: 30px;
    left: 50%;
    -webkit-transform: translate(-50%);
    transform: translate(-50%);
    background: rgba(0, 0, 0, 0.4);
    -webkit-box-shadow: 0 0 5px rgb(0 0 0 / 40%);
    box-shadow: 0 0 5px rgb(0 0 0 / 40%);
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    color: #fff;
    font-size: 20px;
  }
}
</style>
